<div style="color: red; font-size: 30px">hello world</div>
<script>
	function fetchComputedStyle(element, property) {
		const computedStyle = getComputedStyle(element)
		if (computedStyle) {
			property = property.replace(/([A-Z])/g, '-$1').toLowerCase()
			return computedStyle.getPropertyValue(property)
		}
	}
	document.addEventListener('DOMContentLoaded', () => {
		const div = document.querySelector('div')
		console.log(fetchComputedStyle(div, 'color'))
		console.log(fetchComputedStyle(div, 'font-size'))
	})
</script>
